# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=oat
pkgver=1.3.1
pkgrel=4
pkgdesc='A toolkit that could be used to audit security within Oracle database servers.'
arch=('any')
url='http://www.cqure.net/wp/test/'
license=('GPL')
depends=('java-environment')
groups=('blackarch' 'blackarch-fuzzer')
source=("http://www.cqure.net/tools/$pkgname-source-$pkgver.zip"
        'oat-path.patch')
sha512sums=('7f3c961abc86893842bba0fadd7be89e49811734'
          '5e60657066d9bea60ad49f2ce271fe5b71272782')

prepare() {
  cd $pkgname

  patch -Np1 < "$srcdir/oat-path.patch"
}

package() {
  cd $pkgname

  install -dm 755 "$pkgdir/usr/share/$pkgname"

  cp -r tftproot "$pkgdir/usr/share/$pkgname/"
  cp ork.jar accounts.default "$pkgdir/usr/share/$pkgname/"

  for f in *.sh ; do
    install -Dm 755 "$f" "$pkgdir/usr/share/$pkgname/$f"
  done

  install -Dm 644 -t "$pkgdir/usr/share/$pkgname/" README
}

